package pack3;

public class vehicle {
    private double speed;
    private int power;

    public vehicle(int power, double speed) {
        this.power = power;
        this.speed = speed;
    }

    public vehicle() {
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }
    public  void speedup(int s){
        this.speed=speed+s;
    }
    public void speedDown(int s){
        setSpeed(getSpeed()-s);
    }
}
